package com.ionafan2.iaccepteuromaidan;

import android.content.Context;
import android.telephony.TelephonyManager;

public class Utils {

    public static String getDeviceId(Context context) {
        String deviceId = null;
        try {
            TelephonyManager tm = (TelephonyManager) context.getSystemService(Context.TELEPHONY_SERVICE);
            deviceId = tm.getDeviceId();
        } catch (Exception e) {
            e.printStackTrace();
        }

        if (deviceId == null) {
            deviceId = "";
        }

        return deviceId;
    }
}
